// $ANTLR 3.4 D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g 2012-10-28 11:56:14

package ro.one.gaeql.parser;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import ro.one.gaeql.model.*;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class UpdateQueryParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ESC_SEQ", "EXPONENT", "FLOAT", "HEX_DIGIT", "ID", "INT", "OCTAL_ESC", "STRING", "UNICODE_ESC", "'('", "')'", "'+'", "','", "'-'", "'.'", "'<'", "'<='", "'='", "'>'", "'>='", "'AND'", "'CONCAT'", "'SET'", "'UPDATE'", "'USING'", "'WHERE'", "'__key__'"
    };

    public static final int EOF=-1;
    public static final int T__13=13;
    public static final int T__14=14;
    public static final int T__15=15;
    public static final int T__16=16;
    public static final int T__17=17;
    public static final int T__18=18;
    public static final int T__19=19;
    public static final int T__20=20;
    public static final int T__21=21;
    public static final int T__22=22;
    public static final int T__23=23;
    public static final int T__24=24;
    public static final int T__25=25;
    public static final int T__26=26;
    public static final int T__27=27;
    public static final int T__28=28;
    public static final int T__29=29;
    public static final int T__30=30;
    public static final int ESC_SEQ=4;
    public static final int EXPONENT=5;
    public static final int FLOAT=6;
    public static final int HEX_DIGIT=7;
    public static final int ID=8;
    public static final int INT=9;
    public static final int OCTAL_ESC=10;
    public static final int STRING=11;
    public static final int UNICODE_ESC=12;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public UpdateQueryParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public UpdateQueryParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

    public String[] getTokenNames() { return UpdateQueryParser.tokenNames; }
    public String getGrammarFileName() { return "D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g"; }

     
        List<UpdateQuery> queries = new ArrayList<UpdateQuery>();
        Map<String, Kind> aliases = new HashMap<String, Kind>();
        Map<String, Kind> kinds = new HashMap<String, Kind>();
        
        public List<UpdateQuery> getQueries() {
        	return queries;
        }



    // $ANTLR start "query"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:34:1: query returns [UpdateQuery updateQuery] : 'UPDATE' kind 'SET' a1= assign ( ',' a2= assign )* ( 'WHERE' where )? (u= using )* ;
    public final UpdateQuery query() throws RecognitionException {
        UpdateQuery updateQuery = null;


        Assignment a1 =null;

        Assignment a2 =null;

        Using u =null;

        Kind kind1 =null;

        Where where2 =null;



        		List<Using> usings = new ArrayList<Using>();
        		List<Assignment> assignments = new ArrayList<Assignment>();
        	
        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:2: ( 'UPDATE' kind 'SET' a1= assign ( ',' a2= assign )* ( 'WHERE' where )? (u= using )* )
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:4: 'UPDATE' kind 'SET' a1= assign ( ',' a2= assign )* ( 'WHERE' where )? (u= using )*
            {
            match(input,27,FOLLOW_27_in_query51); 

            pushFollow(FOLLOW_kind_in_query53);
            kind1=kind();

            state._fsp--;


            match(input,26,FOLLOW_26_in_query55); 

            pushFollow(FOLLOW_assign_in_query59);
            a1=assign();

            state._fsp--;


             assignments.add(a1); 

            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:59: ( ',' a2= assign )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==16) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:60: ',' a2= assign
            	    {
            	    match(input,16,FOLLOW_16_in_query64); 

            	    pushFollow(FOLLOW_assign_in_query68);
            	    a2=assign();

            	    state._fsp--;


            	     assignments.add(a2); 

            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);


            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:101: ( 'WHERE' where )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==29) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:102: 'WHERE' where
                    {
                    match(input,29,FOLLOW_29_in_query75); 

                    pushFollow(FOLLOW_where_in_query77);
                    where2=where();

                    state._fsp--;


                    }
                    break;

            }


            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:118: (u= using )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==28) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:39:119: u= using
            	    {
            	    pushFollow(FOLLOW_using_in_query84);
            	    u=using();

            	    state._fsp--;


            	     usings.add(u); 

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);



            		updateQuery = new UpdateQuery(kind1, assignments, where2, usings, aliases);
            	

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return updateQuery;
    }
    // $ANTLR end "query"



    // $ANTLR start "using"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:43:1: using returns [Using u] : 'USING' kind 'WHERE' where ;
    public final Using using() throws RecognitionException {
        Using u = null;


        Kind kind3 =null;

        Where where4 =null;


        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:44:2: ( 'USING' kind 'WHERE' where )
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:44:4: 'USING' kind 'WHERE' where
            {
            match(input,28,FOLLOW_28_in_using103); 

            pushFollow(FOLLOW_kind_in_using105);
            kind3=kind();

            state._fsp--;


            match(input,29,FOLLOW_29_in_using107); 

            pushFollow(FOLLOW_where_in_using109);
            where4=where();

            state._fsp--;



            		u = new Using(kind3, where4);
            	

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return u;
    }
    // $ANTLR end "using"



    // $ANTLR start "where"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:48:1: where returns [Where w] : ( condition | condition 'AND' w1= where );
    public final Where where() throws RecognitionException {
        Where w = null;


        Where w1 =null;

        Condition condition5 =null;

        Condition condition6 =null;


        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:49:2: ( condition | condition 'AND' w1= where )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==30) ) {
                int LA4_1 = input.LA(2);

                if ( (LA4_1==21) ) {
                    switch ( input.LA(3) ) {
                    case STRING:
                        {
                        int LA4_10 = input.LA(4);

                        if ( (LA4_10==EOF||LA4_10==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_10==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 10, input);

                            throw nvae;

                        }
                        }
                        break;
                    case INT:
                        {
                        int LA4_11 = input.LA(4);

                        if ( (LA4_11==EOF||LA4_11==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_11==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 11, input);

                            throw nvae;

                        }
                        }
                        break;
                    case FLOAT:
                        {
                        int LA4_12 = input.LA(4);

                        if ( (LA4_12==EOF||LA4_12==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_12==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 12, input);

                            throw nvae;

                        }
                        }
                        break;
                    case ID:
                        {
                        switch ( input.LA(4) ) {
                        case 18:
                            {
                            int LA4_33 = input.LA(5);

                            if ( (LA4_33==ID) ) {
                                int LA4_35 = input.LA(6);

                                if ( (LA4_35==EOF||LA4_35==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_35==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 35, input);

                                    throw nvae;

                                }
                            }
                            else {
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 33, input);

                                throw nvae;

                            }
                            }
                            break;
                        case EOF:
                        case 28:
                            {
                            alt4=1;
                            }
                            break;
                        case 24:
                            {
                            alt4=2;
                            }
                            break;
                        default:
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 13, input);

                            throw nvae;

                        }

                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 3, input);

                        throw nvae;

                    }

                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 4, 1, input);

                    throw nvae;

                }
            }
            else if ( (LA4_0==ID) ) {
                switch ( input.LA(2) ) {
                case 18:
                    {
                    int LA4_4 = input.LA(3);

                    if ( (LA4_4==ID) ) {
                        switch ( input.LA(4) ) {
                        case 21:
                            {
                            switch ( input.LA(5) ) {
                            case STRING:
                                {
                                int LA4_15 = input.LA(6);

                                if ( (LA4_15==EOF||LA4_15==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_15==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 15, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case INT:
                                {
                                int LA4_16 = input.LA(6);

                                if ( (LA4_16==EOF||LA4_16==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_16==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 16, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case FLOAT:
                                {
                                int LA4_17 = input.LA(6);

                                if ( (LA4_17==EOF||LA4_17==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_17==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 17, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case ID:
                                {
                                switch ( input.LA(6) ) {
                                case 18:
                                    {
                                    int LA4_34 = input.LA(7);

                                    if ( (LA4_34==ID) ) {
                                        int LA4_36 = input.LA(8);

                                        if ( (LA4_36==EOF||LA4_36==28) ) {
                                            alt4=1;
                                        }
                                        else if ( (LA4_36==24) ) {
                                            alt4=2;
                                        }
                                        else {
                                            NoViableAltException nvae =
                                                new NoViableAltException("", 4, 36, input);

                                            throw nvae;

                                        }
                                    }
                                    else {
                                        NoViableAltException nvae =
                                            new NoViableAltException("", 4, 34, input);

                                        throw nvae;

                                    }
                                    }
                                    break;
                                case EOF:
                                case 28:
                                    {
                                    alt4=1;
                                    }
                                    break;
                                case 24:
                                    {
                                    alt4=2;
                                    }
                                    break;
                                default:
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 18, input);

                                    throw nvae;

                                }

                                }
                                break;
                            default:
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 5, input);

                                throw nvae;

                            }

                            }
                            break;
                        case 19:
                            {
                            switch ( input.LA(5) ) {
                            case STRING:
                                {
                                int LA4_19 = input.LA(6);

                                if ( (LA4_19==EOF||LA4_19==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_19==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 19, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case INT:
                                {
                                int LA4_20 = input.LA(6);

                                if ( (LA4_20==EOF||LA4_20==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_20==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 20, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case FLOAT:
                                {
                                int LA4_21 = input.LA(6);

                                if ( (LA4_21==EOF||LA4_21==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_21==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 21, input);

                                    throw nvae;

                                }
                                }
                                break;
                            default:
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 6, input);

                                throw nvae;

                            }

                            }
                            break;
                        case 20:
                            {
                            switch ( input.LA(5) ) {
                            case STRING:
                                {
                                int LA4_22 = input.LA(6);

                                if ( (LA4_22==EOF||LA4_22==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_22==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 22, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case INT:
                                {
                                int LA4_23 = input.LA(6);

                                if ( (LA4_23==EOF||LA4_23==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_23==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 23, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case FLOAT:
                                {
                                int LA4_24 = input.LA(6);

                                if ( (LA4_24==EOF||LA4_24==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_24==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 24, input);

                                    throw nvae;

                                }
                                }
                                break;
                            default:
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 7, input);

                                throw nvae;

                            }

                            }
                            break;
                        case 22:
                            {
                            switch ( input.LA(5) ) {
                            case STRING:
                                {
                                int LA4_25 = input.LA(6);

                                if ( (LA4_25==EOF||LA4_25==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_25==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 25, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case INT:
                                {
                                int LA4_26 = input.LA(6);

                                if ( (LA4_26==EOF||LA4_26==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_26==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 26, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case FLOAT:
                                {
                                int LA4_27 = input.LA(6);

                                if ( (LA4_27==EOF||LA4_27==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_27==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 27, input);

                                    throw nvae;

                                }
                                }
                                break;
                            default:
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 8, input);

                                throw nvae;

                            }

                            }
                            break;
                        case 23:
                            {
                            switch ( input.LA(5) ) {
                            case STRING:
                                {
                                int LA4_28 = input.LA(6);

                                if ( (LA4_28==EOF||LA4_28==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_28==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 28, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case INT:
                                {
                                int LA4_29 = input.LA(6);

                                if ( (LA4_29==EOF||LA4_29==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_29==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 29, input);

                                    throw nvae;

                                }
                                }
                                break;
                            case FLOAT:
                                {
                                int LA4_30 = input.LA(6);

                                if ( (LA4_30==EOF||LA4_30==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_30==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 30, input);

                                    throw nvae;

                                }
                                }
                                break;
                            default:
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 9, input);

                                throw nvae;

                            }

                            }
                            break;
                        default:
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 14, input);

                            throw nvae;

                        }

                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 4, input);

                        throw nvae;

                    }
                    }
                    break;
                case 21:
                    {
                    switch ( input.LA(3) ) {
                    case STRING:
                        {
                        int LA4_15 = input.LA(4);

                        if ( (LA4_15==EOF||LA4_15==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_15==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 15, input);

                            throw nvae;

                        }
                        }
                        break;
                    case INT:
                        {
                        int LA4_16 = input.LA(4);

                        if ( (LA4_16==EOF||LA4_16==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_16==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 16, input);

                            throw nvae;

                        }
                        }
                        break;
                    case FLOAT:
                        {
                        int LA4_17 = input.LA(4);

                        if ( (LA4_17==EOF||LA4_17==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_17==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 17, input);

                            throw nvae;

                        }
                        }
                        break;
                    case ID:
                        {
                        switch ( input.LA(4) ) {
                        case 18:
                            {
                            int LA4_34 = input.LA(5);

                            if ( (LA4_34==ID) ) {
                                int LA4_36 = input.LA(6);

                                if ( (LA4_36==EOF||LA4_36==28) ) {
                                    alt4=1;
                                }
                                else if ( (LA4_36==24) ) {
                                    alt4=2;
                                }
                                else {
                                    NoViableAltException nvae =
                                        new NoViableAltException("", 4, 36, input);

                                    throw nvae;

                                }
                            }
                            else {
                                NoViableAltException nvae =
                                    new NoViableAltException("", 4, 34, input);

                                throw nvae;

                            }
                            }
                            break;
                        case EOF:
                        case 28:
                            {
                            alt4=1;
                            }
                            break;
                        case 24:
                            {
                            alt4=2;
                            }
                            break;
                        default:
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 18, input);

                            throw nvae;

                        }

                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 5, input);

                        throw nvae;

                    }

                    }
                    break;
                case 19:
                    {
                    switch ( input.LA(3) ) {
                    case STRING:
                        {
                        int LA4_19 = input.LA(4);

                        if ( (LA4_19==EOF||LA4_19==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_19==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 19, input);

                            throw nvae;

                        }
                        }
                        break;
                    case INT:
                        {
                        int LA4_20 = input.LA(4);

                        if ( (LA4_20==EOF||LA4_20==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_20==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 20, input);

                            throw nvae;

                        }
                        }
                        break;
                    case FLOAT:
                        {
                        int LA4_21 = input.LA(4);

                        if ( (LA4_21==EOF||LA4_21==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_21==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 21, input);

                            throw nvae;

                        }
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 6, input);

                        throw nvae;

                    }

                    }
                    break;
                case 20:
                    {
                    switch ( input.LA(3) ) {
                    case STRING:
                        {
                        int LA4_22 = input.LA(4);

                        if ( (LA4_22==EOF||LA4_22==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_22==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 22, input);

                            throw nvae;

                        }
                        }
                        break;
                    case INT:
                        {
                        int LA4_23 = input.LA(4);

                        if ( (LA4_23==EOF||LA4_23==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_23==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 23, input);

                            throw nvae;

                        }
                        }
                        break;
                    case FLOAT:
                        {
                        int LA4_24 = input.LA(4);

                        if ( (LA4_24==EOF||LA4_24==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_24==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 24, input);

                            throw nvae;

                        }
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 7, input);

                        throw nvae;

                    }

                    }
                    break;
                case 22:
                    {
                    switch ( input.LA(3) ) {
                    case STRING:
                        {
                        int LA4_25 = input.LA(4);

                        if ( (LA4_25==EOF||LA4_25==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_25==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 25, input);

                            throw nvae;

                        }
                        }
                        break;
                    case INT:
                        {
                        int LA4_26 = input.LA(4);

                        if ( (LA4_26==EOF||LA4_26==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_26==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 26, input);

                            throw nvae;

                        }
                        }
                        break;
                    case FLOAT:
                        {
                        int LA4_27 = input.LA(4);

                        if ( (LA4_27==EOF||LA4_27==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_27==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 27, input);

                            throw nvae;

                        }
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 8, input);

                        throw nvae;

                    }

                    }
                    break;
                case 23:
                    {
                    switch ( input.LA(3) ) {
                    case STRING:
                        {
                        int LA4_28 = input.LA(4);

                        if ( (LA4_28==EOF||LA4_28==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_28==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 28, input);

                            throw nvae;

                        }
                        }
                        break;
                    case INT:
                        {
                        int LA4_29 = input.LA(4);

                        if ( (LA4_29==EOF||LA4_29==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_29==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 29, input);

                            throw nvae;

                        }
                        }
                        break;
                    case FLOAT:
                        {
                        int LA4_30 = input.LA(4);

                        if ( (LA4_30==EOF||LA4_30==28) ) {
                            alt4=1;
                        }
                        else if ( (LA4_30==24) ) {
                            alt4=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 4, 30, input);

                            throw nvae;

                        }
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 4, 9, input);

                        throw nvae;

                    }

                    }
                    break;
                default:
                    NoViableAltException nvae =
                        new NoViableAltException("", 4, 2, input);

                    throw nvae;

                }

            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;

            }
            switch (alt4) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:49:4: condition
                    {
                    pushFollow(FOLLOW_condition_in_where125);
                    condition5=condition();

                    state._fsp--;


                     w = new Where(condition5, null, null); 

                    }
                    break;
                case 2 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:50:5: condition 'AND' w1= where
                    {
                    pushFollow(FOLLOW_condition_in_where133);
                    condition6=condition();

                    state._fsp--;


                    match(input,24,FOLLOW_24_in_where135); 

                    pushFollow(FOLLOW_where_in_where139);
                    w1=where();

                    state._fsp--;


                     w = new Where(condition6, LogicalOperator.And, w1); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return w;
    }
    // $ANTLR end "where"



    // $ANTLR start "condition"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:52:1: condition returns [Condition cond] : ( '__key__' '=' expr | '__key__' '=' property | property '=' expr | property '<' expr | property '<=' expr | property '>' expr | property '>=' expr |p1= property '=' p2= property );
    public final Condition condition() throws RecognitionException {
        Condition cond = null;


        Property p1 =null;

        Property p2 =null;

        Object expr7 =null;

        Property property8 =null;

        Property property9 =null;

        Object expr10 =null;

        Property property11 =null;

        Object expr12 =null;

        Property property13 =null;

        Object expr14 =null;

        Property property15 =null;

        Object expr16 =null;

        Property property17 =null;

        Object expr18 =null;


        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:53:2: ( '__key__' '=' expr | '__key__' '=' property | property '=' expr | property '<' expr | property '<=' expr | property '>' expr | property '>=' expr |p1= property '=' p2= property )
            int alt5=8;
            int LA5_0 = input.LA(1);

            if ( (LA5_0==30) ) {
                int LA5_1 = input.LA(2);

                if ( (LA5_1==21) ) {
                    int LA5_3 = input.LA(3);

                    if ( (LA5_3==FLOAT||LA5_3==INT||LA5_3==STRING) ) {
                        alt5=1;
                    }
                    else if ( (LA5_3==ID) ) {
                        alt5=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 5, 3, input);

                        throw nvae;

                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 5, 1, input);

                    throw nvae;

                }
            }
            else if ( (LA5_0==ID) ) {
                switch ( input.LA(2) ) {
                case 18:
                    {
                    int LA5_4 = input.LA(3);

                    if ( (LA5_4==ID) ) {
                        switch ( input.LA(4) ) {
                        case 21:
                            {
                            int LA5_5 = input.LA(5);

                            if ( (LA5_5==FLOAT||LA5_5==INT||LA5_5==STRING) ) {
                                alt5=3;
                            }
                            else if ( (LA5_5==ID) ) {
                                alt5=8;
                            }
                            else {
                                NoViableAltException nvae =
                                    new NoViableAltException("", 5, 5, input);

                                throw nvae;

                            }
                            }
                            break;
                        case 19:
                            {
                            alt5=4;
                            }
                            break;
                        case 20:
                            {
                            alt5=5;
                            }
                            break;
                        case 22:
                            {
                            alt5=6;
                            }
                            break;
                        case 23:
                            {
                            alt5=7;
                            }
                            break;
                        default:
                            NoViableAltException nvae =
                                new NoViableAltException("", 5, 12, input);

                            throw nvae;

                        }

                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 5, 4, input);

                        throw nvae;

                    }
                    }
                    break;
                case 21:
                    {
                    int LA5_5 = input.LA(3);

                    if ( (LA5_5==FLOAT||LA5_5==INT||LA5_5==STRING) ) {
                        alt5=3;
                    }
                    else if ( (LA5_5==ID) ) {
                        alt5=8;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 5, 5, input);

                        throw nvae;

                    }
                    }
                    break;
                case 19:
                    {
                    alt5=4;
                    }
                    break;
                case 20:
                    {
                    alt5=5;
                    }
                    break;
                case 22:
                    {
                    alt5=6;
                    }
                    break;
                case 23:
                    {
                    alt5=7;
                    }
                    break;
                default:
                    NoViableAltException nvae =
                        new NoViableAltException("", 5, 2, input);

                    throw nvae;

                }

            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 5, 0, input);

                throw nvae;

            }
            switch (alt5) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:53:4: '__key__' '=' expr
                    {
                    match(input,30,FOLLOW_30_in_condition154); 

                    match(input,21,FOLLOW_21_in_condition156); 

                    pushFollow(FOLLOW_expr_in_condition158);
                    expr7=expr();

                    state._fsp--;


                     cond = new Condition(null, null, expr7); 

                    }
                    break;
                case 2 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:54:4: '__key__' '=' property
                    {
                    match(input,30,FOLLOW_30_in_condition165); 

                    match(input,21,FOLLOW_21_in_condition167); 

                    pushFollow(FOLLOW_property_in_condition169);
                    property8=property();

                    state._fsp--;


                     cond = new Condition(null, property8); 

                    }
                    break;
                case 3 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:55:4: property '=' expr
                    {
                    pushFollow(FOLLOW_property_in_condition176);
                    property9=property();

                    state._fsp--;


                    match(input,21,FOLLOW_21_in_condition178); 

                    pushFollow(FOLLOW_expr_in_condition180);
                    expr10=expr();

                    state._fsp--;


                     cond = new Condition(property9, Operator.Equals, expr10); 

                    }
                    break;
                case 4 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:56:4: property '<' expr
                    {
                    pushFollow(FOLLOW_property_in_condition187);
                    property11=property();

                    state._fsp--;


                    match(input,19,FOLLOW_19_in_condition189); 

                    pushFollow(FOLLOW_expr_in_condition191);
                    expr12=expr();

                    state._fsp--;


                     cond = new Condition(property11, Operator.LessThan, expr12); 

                    }
                    break;
                case 5 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:57:4: property '<=' expr
                    {
                    pushFollow(FOLLOW_property_in_condition198);
                    property13=property();

                    state._fsp--;


                    match(input,20,FOLLOW_20_in_condition200); 

                    pushFollow(FOLLOW_expr_in_condition202);
                    expr14=expr();

                    state._fsp--;


                     cond = new Condition(property13, Operator.LessThanOrEqual, expr14); 

                    }
                    break;
                case 6 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:58:4: property '>' expr
                    {
                    pushFollow(FOLLOW_property_in_condition209);
                    property15=property();

                    state._fsp--;


                    match(input,22,FOLLOW_22_in_condition211); 

                    pushFollow(FOLLOW_expr_in_condition213);
                    expr16=expr();

                    state._fsp--;


                     cond = new Condition(property15, Operator.GreaterThan, expr16); 

                    }
                    break;
                case 7 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:59:4: property '>=' expr
                    {
                    pushFollow(FOLLOW_property_in_condition220);
                    property17=property();

                    state._fsp--;


                    match(input,23,FOLLOW_23_in_condition222); 

                    pushFollow(FOLLOW_expr_in_condition224);
                    expr18=expr();

                    state._fsp--;


                     cond = new Condition(property17, Operator.GreaterThanOrEqual, expr18); 

                    }
                    break;
                case 8 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:60:4: p1= property '=' p2= property
                    {
                    pushFollow(FOLLOW_property_in_condition233);
                    p1=property();

                    state._fsp--;


                    match(input,21,FOLLOW_21_in_condition235); 

                    pushFollow(FOLLOW_property_in_condition239);
                    p2=property();

                    state._fsp--;


                     cond = new Condition(p1, p2); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return cond;
    }
    // $ANTLR end "condition"



    // $ANTLR start "kind"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:62:1: kind returns [Kind k] : kindName= ID (alias= ID )? ;
    public final Kind kind() throws RecognitionException {
        Kind k = null;


        Token kindName=null;
        Token alias=null;

        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:63:2: (kindName= ID (alias= ID )? )
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:63:4: kindName= ID (alias= ID )?
            {
            kindName=(Token)match(input,ID,FOLLOW_ID_in_kind256); 

            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:63:16: (alias= ID )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==ID) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:63:17: alias= ID
                    {
                    alias=(Token)match(input,ID,FOLLOW_ID_in_kind261); 

                    }
                    break;

            }


             
            		if (aliases.containsKey((alias!=null?alias.getText():null))) {
            		   throw new RuntimeException("Alias '" + (alias!=null?alias.getText():null) + "' is duplicated");
            		}
            		else if (kinds.containsKey((kindName!=null?kindName.getText():null))) {
            		   throw new RuntimeException("Kind '" + (kindName!=null?kindName.getText():null) + "' is duplicated");
            		}
            		else {
             		   k = new Kind((kindName!=null?kindName.getText():null)); 
             		   
             		   if ((alias!=null?alias.getText():null) != null) {
                                  aliases.put((alias!=null?alias.getText():null), k);
                               }
                               
                               kinds.put((kindName!=null?kindName.getText():null), k);
            		}
            	

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return k;
    }
    // $ANTLR end "kind"



    // $ANTLR start "assign"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:81:1: assign returns [Assignment assig] : property '=' assignExpr ;
    public final Assignment assign() throws RecognitionException {
        Assignment assig = null;


        Property property19 =null;

        AssignExpression assignExpr20 =null;


        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:82:2: ( property '=' assignExpr )
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:82:5: property '=' assignExpr
            {
            pushFollow(FOLLOW_property_in_assign279);
            property19=property();

            state._fsp--;


            match(input,21,FOLLOW_21_in_assign281); 

            pushFollow(FOLLOW_assignExpr_in_assign283);
            assignExpr20=assignExpr();

            state._fsp--;


             
            		assig = new Assignment(property19, assignExpr20);
            	

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return assig;
    }
    // $ANTLR end "assign"



    // $ANTLR start "assignExpr"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:86:1: assignExpr returns [AssignExpression ex] : (e1= atom '+' e2= assignExpr |e1= atom '-' e2= assignExpr |e1= atom 'CONCAT' e2= assignExpr | '(' a= assignExpr ')' | atom );
    public final AssignExpression assignExpr() throws RecognitionException {
        AssignExpression ex = null;


        Evaluable e1 =null;

        AssignExpression e2 =null;

        AssignExpression a =null;

        Evaluable atom21 =null;


        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:87:2: (e1= atom '+' e2= assignExpr |e1= atom '-' e2= assignExpr |e1= atom 'CONCAT' e2= assignExpr | '(' a= assignExpr ')' | atom )
            int alt7=5;
            switch ( input.LA(1) ) {
            case INT:
                {
                switch ( input.LA(2) ) {
                case 15:
                    {
                    alt7=1;
                    }
                    break;
                case 17:
                    {
                    alt7=2;
                    }
                    break;
                case 25:
                    {
                    alt7=3;
                    }
                    break;
                case EOF:
                case 14:
                case 16:
                case 28:
                case 29:
                    {
                    alt7=5;
                    }
                    break;
                default:
                    NoViableAltException nvae =
                        new NoViableAltException("", 7, 1, input);

                    throw nvae;

                }

                }
                break;
            case STRING:
                {
                switch ( input.LA(2) ) {
                case 15:
                    {
                    alt7=1;
                    }
                    break;
                case 17:
                    {
                    alt7=2;
                    }
                    break;
                case 25:
                    {
                    alt7=3;
                    }
                    break;
                case EOF:
                case 14:
                case 16:
                case 28:
                case 29:
                    {
                    alt7=5;
                    }
                    break;
                default:
                    NoViableAltException nvae =
                        new NoViableAltException("", 7, 2, input);

                    throw nvae;

                }

                }
                break;
            case ID:
                {
                switch ( input.LA(2) ) {
                case 18:
                    {
                    int LA7_9 = input.LA(3);

                    if ( (LA7_9==ID) ) {
                        switch ( input.LA(4) ) {
                        case 15:
                            {
                            alt7=1;
                            }
                            break;
                        case 17:
                            {
                            alt7=2;
                            }
                            break;
                        case 25:
                            {
                            alt7=3;
                            }
                            break;
                        case EOF:
                        case 14:
                        case 16:
                        case 28:
                        case 29:
                            {
                            alt7=5;
                            }
                            break;
                        default:
                            NoViableAltException nvae =
                                new NoViableAltException("", 7, 10, input);

                            throw nvae;

                        }

                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 7, 9, input);

                        throw nvae;

                    }
                    }
                    break;
                case 15:
                    {
                    alt7=1;
                    }
                    break;
                case 17:
                    {
                    alt7=2;
                    }
                    break;
                case 25:
                    {
                    alt7=3;
                    }
                    break;
                case EOF:
                case 14:
                case 16:
                case 28:
                case 29:
                    {
                    alt7=5;
                    }
                    break;
                default:
                    NoViableAltException nvae =
                        new NoViableAltException("", 7, 3, input);

                    throw nvae;

                }

                }
                break;
            case 13:
                {
                alt7=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;

            }

            switch (alt7) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:87:4: e1= atom '+' e2= assignExpr
                    {
                    pushFollow(FOLLOW_atom_in_assignExpr300);
                    e1=atom();

                    state._fsp--;


                    match(input,15,FOLLOW_15_in_assignExpr302); 

                    pushFollow(FOLLOW_assignExpr_in_assignExpr306);
                    e2=assignExpr();

                    state._fsp--;


                     ex = new AssignExpression(e1, AssignExpressionOperator.Plus, e2); 

                    }
                    break;
                case 2 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:88:4: e1= atom '-' e2= assignExpr
                    {
                    pushFollow(FOLLOW_atom_in_assignExpr315);
                    e1=atom();

                    state._fsp--;


                    match(input,17,FOLLOW_17_in_assignExpr317); 

                    pushFollow(FOLLOW_assignExpr_in_assignExpr321);
                    e2=assignExpr();

                    state._fsp--;


                     ex = new AssignExpression(e1, AssignExpressionOperator.Minus, e2); 

                    }
                    break;
                case 3 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:89:4: e1= atom 'CONCAT' e2= assignExpr
                    {
                    pushFollow(FOLLOW_atom_in_assignExpr330);
                    e1=atom();

                    state._fsp--;


                    match(input,25,FOLLOW_25_in_assignExpr332); 

                    pushFollow(FOLLOW_assignExpr_in_assignExpr336);
                    e2=assignExpr();

                    state._fsp--;


                     ex = new AssignExpression(e1, AssignExpressionOperator.Concat, e2); 

                    }
                    break;
                case 4 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:90:5: '(' a= assignExpr ')'
                    {
                    match(input,13,FOLLOW_13_in_assignExpr344); 

                    pushFollow(FOLLOW_assignExpr_in_assignExpr348);
                    a=assignExpr();

                    state._fsp--;


                    match(input,14,FOLLOW_14_in_assignExpr350); 

                     ex = a; 

                    }
                    break;
                case 5 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:92:4: atom
                    {
                    pushFollow(FOLLOW_atom_in_assignExpr358);
                    atom21=atom();

                    state._fsp--;


                     ex = new AssignExpression(atom21); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ex;
    }
    // $ANTLR end "assignExpr"



    // $ANTLR start "atom"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:99:1: atom returns [Evaluable value] : ( INT | STRING | property );
    public final Evaluable atom() throws RecognitionException {
        Evaluable value = null;


        Token INT22=null;
        Token STRING23=null;
        Property property24 =null;


        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:100:5: ( INT | STRING | property )
            int alt8=3;
            switch ( input.LA(1) ) {
            case INT:
                {
                alt8=1;
                }
                break;
            case STRING:
                {
                alt8=2;
                }
                break;
            case ID:
                {
                alt8=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 8, 0, input);

                throw nvae;

            }

            switch (alt8) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:100:9: INT
                    {
                    INT22=(Token)match(input,INT,FOLLOW_INT_in_atom383); 

                     value = new Constant(new Integer((INT22!=null?INT22.getText():null))); 

                    }
                    break;
                case 2 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:101:8: STRING
                    {
                    STRING23=(Token)match(input,STRING,FOLLOW_STRING_in_atom394); 

                     value = new Constant(StringUtil.trimQuotes((STRING23!=null?STRING23.getText():null))); 

                    }
                    break;
                case 3 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:102:7: property
                    {
                    pushFollow(FOLLOW_property_in_atom404);
                    property24=property();

                    state._fsp--;


                     value = property24; 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return value;
    }
    // $ANTLR end "atom"



    // $ANTLR start "argumentList"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:105:1: argumentList returns [List<Evaluable> args] : (a1= assignExpr ( ',' a2= assignExpr )* )? ;
    public final List<Evaluable> argumentList() throws RecognitionException {
        List<Evaluable> args = null;


        AssignExpression a1 =null;

        AssignExpression a2 =null;



        		args = new ArrayList<Evaluable>();
        	
        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:109:2: ( (a1= assignExpr ( ',' a2= assignExpr )* )? )
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:109:4: (a1= assignExpr ( ',' a2= assignExpr )* )?
            {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:109:4: (a1= assignExpr ( ',' a2= assignExpr )* )?
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( ((LA10_0 >= ID && LA10_0 <= INT)||LA10_0==STRING||LA10_0==13) ) {
                alt10=1;
            }
            switch (alt10) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:109:5: a1= assignExpr ( ',' a2= assignExpr )*
                    {
                    pushFollow(FOLLOW_assignExpr_in_argumentList434);
                    a1=assignExpr();

                    state._fsp--;


                     args.add(a1); 

                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:109:38: ( ',' a2= assignExpr )*
                    loop9:
                    do {
                        int alt9=2;
                        int LA9_0 = input.LA(1);

                        if ( (LA9_0==16) ) {
                            alt9=1;
                        }


                        switch (alt9) {
                    	case 1 :
                    	    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:109:39: ',' a2= assignExpr
                    	    {
                    	    match(input,16,FOLLOW_16_in_argumentList439); 

                    	    pushFollow(FOLLOW_assignExpr_in_argumentList443);
                    	    a2=assignExpr();

                    	    state._fsp--;


                    	     args.add(a2); 

                    	    }
                    	    break;

                    	default :
                    	    break loop9;
                        }
                    } while (true);


                    }
                    break;

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return args;
    }
    // $ANTLR end "argumentList"



    // $ANTLR start "property"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:111:1: property returns [Property prop] : (alias= ID '.' )? propertyName= ID ;
    public final Property property() throws RecognitionException {
        Property prop = null;


        Token alias=null;
        Token propertyName=null;

        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:112:2: ( (alias= ID '.' )? propertyName= ID )
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:112:4: (alias= ID '.' )? propertyName= ID
            {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:112:4: (alias= ID '.' )?
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==ID) ) {
                int LA11_1 = input.LA(2);

                if ( (LA11_1==18) ) {
                    alt11=1;
                }
            }
            switch (alt11) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:112:5: alias= ID '.'
                    {
                    alias=(Token)match(input,ID,FOLLOW_ID_in_property465); 

                    match(input,18,FOLLOW_18_in_property467); 

                    }
                    break;

            }


            propertyName=(Token)match(input,ID,FOLLOW_ID_in_property473); 

             		
            		prop = new Property((alias!=null?alias.getText():null), (propertyName!=null?propertyName.getText():null)); 
            	

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return prop;
    }
    // $ANTLR end "property"



    // $ANTLR start "expr"
    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:116:1: expr returns [Object exp] : ( STRING | INT | FLOAT );
    public final Object expr() throws RecognitionException {
        Object exp = null;


        Token STRING25=null;
        Token INT26=null;
        Token FLOAT27=null;

        try {
            // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:117:2: ( STRING | INT | FLOAT )
            int alt12=3;
            switch ( input.LA(1) ) {
            case STRING:
                {
                alt12=1;
                }
                break;
            case INT:
                {
                alt12=2;
                }
                break;
            case FLOAT:
                {
                alt12=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 12, 0, input);

                throw nvae;

            }

            switch (alt12) {
                case 1 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:117:4: STRING
                    {
                    STRING25=(Token)match(input,STRING,FOLLOW_STRING_in_expr487); 

                     exp = StringUtil.trimQuotes((STRING25!=null?STRING25.getText():null)); 

                    }
                    break;
                case 2 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:118:4: INT
                    {
                    INT26=(Token)match(input,INT,FOLLOW_INT_in_expr494); 

                     exp = new Integer((INT26!=null?INT26.getText():null)); 

                    }
                    break;
                case 3 :
                    // D:\\Projects\\gae-ql\\antlr\\UpdateQuery.g:119:4: FLOAT
                    {
                    FLOAT27=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_expr501); 

                     exp = new Float((FLOAT27!=null?FLOAT27.getText():null)); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return exp;
    }
    // $ANTLR end "expr"

    // Delegated rules


 

    public static final BitSet FOLLOW_27_in_query51 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_kind_in_query53 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_26_in_query55 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_assign_in_query59 = new BitSet(new long[]{0x0000000030010002L});
    public static final BitSet FOLLOW_16_in_query64 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_assign_in_query68 = new BitSet(new long[]{0x0000000030010002L});
    public static final BitSet FOLLOW_29_in_query75 = new BitSet(new long[]{0x0000000040000100L});
    public static final BitSet FOLLOW_where_in_query77 = new BitSet(new long[]{0x0000000010000002L});
    public static final BitSet FOLLOW_using_in_query84 = new BitSet(new long[]{0x0000000010000002L});
    public static final BitSet FOLLOW_28_in_using103 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_kind_in_using105 = new BitSet(new long[]{0x0000000020000000L});
    public static final BitSet FOLLOW_29_in_using107 = new BitSet(new long[]{0x0000000040000100L});
    public static final BitSet FOLLOW_where_in_using109 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_condition_in_where125 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_condition_in_where133 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_where135 = new BitSet(new long[]{0x0000000040000100L});
    public static final BitSet FOLLOW_where_in_where139 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_condition154 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_condition156 = new BitSet(new long[]{0x0000000000000A40L});
    public static final BitSet FOLLOW_expr_in_condition158 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_condition165 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_condition167 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_property_in_condition169 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_condition176 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_condition178 = new BitSet(new long[]{0x0000000000000A40L});
    public static final BitSet FOLLOW_expr_in_condition180 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_condition187 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_19_in_condition189 = new BitSet(new long[]{0x0000000000000A40L});
    public static final BitSet FOLLOW_expr_in_condition191 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_condition198 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_condition200 = new BitSet(new long[]{0x0000000000000A40L});
    public static final BitSet FOLLOW_expr_in_condition202 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_condition209 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_22_in_condition211 = new BitSet(new long[]{0x0000000000000A40L});
    public static final BitSet FOLLOW_expr_in_condition213 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_condition220 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_23_in_condition222 = new BitSet(new long[]{0x0000000000000A40L});
    public static final BitSet FOLLOW_expr_in_condition224 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_condition233 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_condition235 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_property_in_condition239 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_kind256 = new BitSet(new long[]{0x0000000000000102L});
    public static final BitSet FOLLOW_ID_in_kind261 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_assign279 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_21_in_assign281 = new BitSet(new long[]{0x0000000000002B00L});
    public static final BitSet FOLLOW_assignExpr_in_assign283 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_atom_in_assignExpr300 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_assignExpr302 = new BitSet(new long[]{0x0000000000002B00L});
    public static final BitSet FOLLOW_assignExpr_in_assignExpr306 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_atom_in_assignExpr315 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_assignExpr317 = new BitSet(new long[]{0x0000000000002B00L});
    public static final BitSet FOLLOW_assignExpr_in_assignExpr321 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_atom_in_assignExpr330 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_assignExpr332 = new BitSet(new long[]{0x0000000000002B00L});
    public static final BitSet FOLLOW_assignExpr_in_assignExpr336 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_13_in_assignExpr344 = new BitSet(new long[]{0x0000000000002B00L});
    public static final BitSet FOLLOW_assignExpr_in_assignExpr348 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_14_in_assignExpr350 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_atom_in_assignExpr358 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INT_in_atom383 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_in_atom394 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_property_in_atom404 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_assignExpr_in_argumentList434 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_16_in_argumentList439 = new BitSet(new long[]{0x0000000000002B00L});
    public static final BitSet FOLLOW_assignExpr_in_argumentList443 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_ID_in_property465 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_18_in_property467 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_ID_in_property473 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_in_expr487 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INT_in_expr494 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FLOAT_in_expr501 = new BitSet(new long[]{0x0000000000000002L});

}